export function formatDiagramData(diagramData) {
    diagramData.nodes.forEach(node => {
        node.key = node.id;
        delete node.id;
    });
    diagramData.edges.forEach(edge => {
        edge.from = edge.source;
        edge.to = edge.target;
        delete edge.source;
        delete edge.target;
    });
    return diagramData;
}